dr='n:'
f1='PATI'

REST FROM N:PATI ADDI
A=VAL(RIGHT(PTA,5))
B=VAL(RIGHT(PTB,5))
C=VAL(RIGHT(PTC,5))
D=VAL(RIGHT(PTD,5))
E=VAL(RIGHT(PTE,5))
F=VAL(RIGHT(PTF,5))
G=VAL(RIGHT(PTG,5))
H=VAL(RIGHT(PTH,5))
I=VAL(RIGHT(PTI,5))
J=VAL(RIGHT(PTJ,5))
K=VAL(RIGHT(PTK,5))
L=VAL(RIGHT(PTL,5))
M=VAL(RIGHT(PTM,5))
N=VAL(RIGHT(PTN,5))
O=VAL(RIGHT(PTO,5))
P=VAL(RIGHT(PTP,5))
Q=VAL(RIGHT(PTQ,5))
R=VAL(RIGHT(PTR,5))
S=VAL(RIGHT(PTS,5))
T=VAL(RIGHT(PTT,5))
U=VAL(RIGHT(PTU,5))
V=VAL(RIGHT(PTV,5))
W=VAL(RIGHT(PTW,5))
X=VAL(RIGHT(PTX,5))
Y=VAL(RIGHT(PTY,5))
Z=VAL(RIGHT(PTZ,5))

sele 1
use &dr&f1
LOCATE FOR PAT_INIT='A'
REPL PAT_NUMB WITH A

LOCATE FOR PAT_INIT='B'
REPL PAT_NUMB WITH B

LOCATE FOR PAT_INIT='C'
REPL PAT_NUMB WITH C

LOCATE FOR PAT_INIT='D'
REPL PAT_NUMB WITH D

LOCATE FOR PAT_INIT='E'
REPL PAT_NUMB WITH E

LOCATE FOR PAT_INIT='F'
REPL PAT_NUMB WITH F

LOCATE FOR PAT_INIT='G'
REPL PAT_NUMB WITH G

LOCATE FOR PAT_INIT='H'
REPL PAT_NUMB WITH H

LOCATE FOR PAT_INIT='I'
REPL PAT_NUMB WITH I

LOCATE FOR PAT_INIT='J'
REPL PAT_NUMB WITH J

LOCATE FOR PAT_INIT='K'
REPL PAT_NUMB WITH K

LOCATE FOR PAT_INIT='L'
REPL PAT_NUMB WITH L

LOCATE FOR PAT_INIT='M'
REPL PAT_NUMB WITH M

LOCATE FOR PAT_INIT='N'
REPL PAT_NUMB WITH N

LOCATE FOR PAT_INIT='O'
REPL PAT_NUMB WITH O

LOCATE FOR PAT_INIT='P'
REPL PAT_NUMB WITH P

LOCATE FOR PAT_INIT='Q'
REPL PAT_NUMB WITH Q

LOCATE FOR PAT_INIT='R'
REPL PAT_NUMB WITH R

LOCATE FOR PAT_INIT='S'
REPL PAT_NUMB WITH S

LOCATE FOR PAT_INIT='T'
REPL PAT_NUMB WITH T

LOCATE FOR PAT_INIT='U'
REPL PAT_NUMB WITH U

LOCATE FOR PAT_INIT='V'
REPL PAT_NUMB WITH V

LOCATE FOR PAT_INIT='W'
REPL PAT_NUMB WITH W

LOCATE FOR PAT_INIT='X'
REPL PAT_NUMB WITH X

LOCATE FOR PAT_INIT='Y'
REPL PAT_NUMB WITH Y

LOCATE FOR PAT_INIT='Z'
REPL PAT_NUMB WITH Z

